package com.tgy;

import lombok.Data;

/**
 * @Author: tgy
 * @Date: 2020-10-15 11:10
 */
@Data
public class Person implements Comparable<Person> {

    private Integer age;

    private Integer score;

    public Person(Integer age, Integer score) {
        this.age = age;
        this.score = score;
    }

    @Override
    public int compareTo(Person o) {

        return this.age - this.age;
    }
}
